#ifndef TEMP_HUMI_H
#define TEMP_HUMI_H

#include <QObject>
#include <QWidget>
#include <QDebug>
#include <stdio.h>
#include <string.h>
#include "unistd.h"
#include "sys/types.h"
#include "sys/stat.h"
#include "sys/ioctl.h"
#include "fcntl.h"
#include "stdlib.h"
#include "string.h"
#include <poll.h>
#include <sys/select.h>
#include <sys/time.h>
#include <signal.h>
#include <fcntl.h>

typedef struct aht20_data
{
    float humi;
    float temp;
}aht20_data_t;

#define AHT20_DEV "/dev/aht20"


class Temp_Humi : public QWidget
{
    Q_OBJECT
public:
    explicit Temp_Humi(QWidget *parent = nullptr);
    ~Temp_Humi();

    int aht20_read(aht20_data_t *data);

signals:


private:
    int aht20_fd;

    int aht20_init(void);

};

#endif // TEMP_HUMI_H
